package common;

/**
 * A wrapper that allows "final" elements to be changed because Java is <i>stupid</i>
 * 
 * @author Gal Lalouche
 * @param <T> The type of the element wrapped
 */
public class MutableWrapper<T> {
	private T	element;
	
	/**
	 * Creates new MutableWrapper with no element
	 */
	public MutableWrapper() {
		this.element = null;
	}
	
	/**
	 * Creates a new MutableWrapper
	 * 
	 * @param element The element to wrap
	 */
	public MutableWrapper(T element) {
		this.element = element;
	}
	
	/**
	 * @return the element
	 */
	public T get() {
		return element;
	}
	
	/**
	 * @param element the element to set
	 */
	public void set(T element) {
		this.element = element;
	}
}
